#ifndef OSGVIEWERQT_H
#define OSGVIEWERQT_H

#include <QtCore/QTimer>

#include <osgViewer/CompositeViewer>

class ViewerWidget : public QWidget, public osgViewer::CompositeViewer
{
    

public:
    ViewerWidget(
        QWidget * parent = 0,
        Qt::WindowFlags f = 0,
        osgViewer::ViewerBase::ThreadingModel threadingModel=osgViewer::ViewerBase::CullThreadPerCameraDrawThreadPerContext);
    
    QWidget* addViewWidget( osg::Camera* camera, osg::Node* scene );
    
    osg::Camera* createCamera( int x, int y, int w, int h, const std::string& name="", bool windowDecoration=false );
    
    virtual void paintEvent( QPaintEvent* event );

protected:
    
    QTimer m_timer;
};


#endif // OSGVIEWERQT_H